extends Area2D

signal hit

func _on_body_entered(body: Node2D) -> void:
	if body.name == "Player":
		hit.emit()
		$Splash.play()

func changeColor(r, g, b):
	var tween = get_tree().create_tween()
	
	var color = Color(r, g, b, 1.0)
	
	tween.tween_property($Sprite2D.material, "shader_parameter/color", color, 0.25)
